import request from '@/utils/request'

// 查询类目列表
export function getFormatSpecData(query) {
    return request({
        url: '/system/spec/list',
        method: 'get',
        params: query
    })
}


// 查询规格详细
export function getSpec(specId) {
    return request({
        url: '/system/spec/' + specId,
        method: 'get'
    })
}

// 新增规格
export function addSpec(data) {
    return request({
        url: '/system/spec',
        method: 'post',
        data: data
    })
}

// 修改规格
export function updateSpec(data) {
    return request({
        url: '/system/spec',
        method: 'put',
        data: data
    })
}

// 删除规格
export function delSpec(specId) {
    return request({
        url: '/system/spec/' + specId,
        method: 'delete'
    })
}